package com.kly.agent.controller;

import com.kly.agent.common.BaseResponse;
import com.kly.agent.common.ResultUtils;
import com.kly.agent.domain.entity.User;
import com.kly.agent.service.UserService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author admin
 * @date 2025/5/20
 */
@RestController
@RequestMapping("/users")
@Slf4j
public class UserController {

    @Resource
    private UserService userService;


    @GetMapping("/get")
    public BaseResponse<User> get() {
        User byId = userService.getById(1L);
        log.info("user: {}", byId);
        return ResultUtils.success(byId);
    }
}
